﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using Microsoft.Kinect;

namespace SVU.Managers
{
    public class KinectManager
    {


   


        public static void UninitializeKinectServices(KinectSensor sensor)
        {

            sensor.AudioSource.Stop();

            // Stop streaming
            sensor.Stop();

            // Inform the viewers that they no longer have a Kinect KinectSensor.
            //this.KinectColorViewer.Kinect = null;
            //KinectDepthViewer.Kinect = null;
            //KinectSkeletonViewerOnColor.Kinect = null;
            //KinectSkeletonViewerOnDepth.Kinect = null;
            //kinectAudioViewer.Kinect = null;

            // Disable skeletonengine, as only one Kinect can have it enabled at a time.
            if (sensor.SkeletonStream != null)
            {
                sensor.SkeletonStream.Disable();
            }

        }
    }
}
